﻿@model IEnumerable<PiscoSourDominio.Reserva>
@{
    ViewBag.Title = "List";
    Layout = "~/Views/Shared/_Layout.cshtml";
    WebGrid grid = new WebGrid(Model);
}

<style type="text/css">

.gridReservas 
{
    color:Black;
    }
    
</style>


<div class="Content">

@ViewBag.test

<h2>Listado de Reserva</h2>

<!--
<table>
<tr>
    <td>Fecha Reserva <input type="text" value="" /></td>
    <td></td>
</tr>
</table>

<br /><br />
-->

<div class="gridReservas">

@grid.GetHtml(
    columns: grid.Columns(

                grid.Column(columnName: "intReserva", header: "ID", style: "text-align-center"),

                grid.Column(columnName: "local.vchNombre", header: "Nombre", style: "text-align-center"),
                
                grid.Column(columnName: "local.vchDireccion", header: "Dirección",style: "text-align-center"),

                grid.Column(columnName: "intCantidadPersonas", header: "Personas", style: "text-align-center"),

                grid.Column(columnName: "dtFecReserva", header: "Reserva", style: "text-align-center"),

                grid.Column(header: "Acciones", format: (item) => 
                 new HtmlString(
                                   Html.ActionLink("Pre - Orden", "../Orden/Register/", new { id = item.intReserva }).ToString() + " " +
                               Html.ActionLink("Ver Platos", "../Orden/Listar/", new { id = item.intReserva }).ToString() 
                 ) 
            ) 

 ),
 
   tableStyle: "webgrid",
   headerStyle: "webgrid-header",
   footerStyle: "webgrid-footer",
   alternatingRowStyle: "webgrid-alternating-row",
   selectedRowStyle: "webgrid-selected-row",
   rowStyle: "webgrid-row-style")


<br />

</div>

<a href="@Url.Action("ListReserva", "Restaurante")" >Regresar</a>

</div>